1. Field
Apparatuses and methods consistent with exemplary embodiments relate to canceling instructions and resetting a source-ready state, and more particularly to, canceling direct dependent instructions and nested dependent instructions of a producer instruction using a cancel timer and resetting source ready bits.
2. Description of the Related Art
Modern microprocessors adopt a technique of speculative scheduling of instructions. When a producer instruction in a scheduler of a microprocessor is canceled due to an event such as load misses, faults, data hazards, etc., a state of “source ready” for dependent instructions which have been speculatively woken up by the producer instruction needs to be reset in a scheduler for the instructions so that these dependent instructions can be eligible to be picked again. The dependent instructions may be direct or indirect (or nested) instructions.
In a related art approach to undo or reset the state of “source ready” for dependent instructions in a scheduler when a producer instruction is canceled, destination tags of the canceled producer instruction are compared with source tags of all the instructions in the scheduler. If there is a match between a destination tag of the canceled producer instruction and a source tag of any instruction in the scheduler, the scheduler resets the source-ready state of the dependent instruction in the scheduler.
Since, however, the above comparison needs to be done for all the sources of all the instructions in the scheduler, the number of comparison is enormous to consume time, power, and resources of the microprocessor.